//http://127.0.0.1:5000/api/teacher/students
setTimeout(async () => {
  response = await taskObject.fetchtemplate((path = "/api/teacher/students"));
  let studnetsdata = [];

  JSON.parse(JSON.stringify(dataform))["teacher"].forEach((key) => {
    response.data.forEach((item) => {
      if (key.id == item.courseid) {
        console.log(key);
        let infodata = {
          classname: key["classname"],
          major: key["major"],
          colegename: key["colegename"],
          coursename: key["coursename"],
          number:item['number'],
          username: item.username,
          id: item.id,
          timestamp: key["timestamp"],
        };

        studnetsdata.push(infodata);
       
      }
    });
  });

  await rendertable(
    (data = [... studnetsdata]),
    (domhtml = ".students table tbody"),
    (domdata = [
      "id",
      "username",
      "classname",
      "major",
      "colegename",
      "coursename",
      "number",
      "timestamp",
    ])
  );
}, 1200);
